﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Control;
using Model;
using System.ServiceModel;

namespace WCF
{
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]
    public class BookingService : IBookingService
    
    {
        private BookingController bookCTR;

        public BookingService()
        {
            bookCTR = new BookingController();
        }

        public List<Seat> GetSeatsTaken(Show showObj, bool retriveAssociation)
        {
            return bookCTR.GetSeatsTaken(showObj, retriveAssociation);
        }

        public int CreateBooking(List<string> seatIds, DateTime dtStart, string cName, string phoneNo, int reservation, double pricePrTicket)
        {
            return bookCTR.CreateBooking(seatIds, dtStart, cName, phoneNo, reservation, pricePrTicket);
        }

        public DateTime[] GetDates14days()
        {
            return bookCTR.GetDates14days();
        }

        public List<Show> GetShowsForThisDate(DateTime date)
        {
            return bookCTR.GetShowsForThisDate(date);
        }

        public List<Booking> FindBookings(string phoneNo)
        {
            return bookCTR.FindBookings(phoneNo);
        }

        public int DeleteBooking(Booking bookingObj)
        {
            return bookCTR.DeleteBooking(bookingObj);
        }
    }
}
